<template>
  <section>
    <el-row :gutter="20"
            class="tableHead">
      <el-col :span="3">合同编号</el-col>
      <el-col :span="6">发货信息</el-col>
      <el-col :span="6">收货信息</el-col>
      <el-col :span="3">总件数</el-col>
      <el-col :span="3">总重量(公斤)</el-col>
      <el-col :span="3">总体积(立方米)</el-col>
    </el-row>
    <template v-for="(item, index) in recordsList">
      <div :key="index">
        <el-row :gutter="20"
                class="line-herger28">
          <el-col :span="3">
            <div class="mt20 fontSty-1">{{ item.no }}</div>
          </el-col>
          <el-col :span="6">
            <div class="mt20">
              <p class="fontSty-2">{{ item.from.cstName }}</p>
              <span class="fontSty-3">发货地址：</span>{{ item.from.address
              }}<br />
              <span class="fontSty-3">联系方式：</span>{{ item.from.customer }}
              {{ item.from.tel }}<br />
              <span class="fontSty-3">发货时间：</span>{{ item.from.time }}
            </div>
          </el-col>
          <el-col :span="6">
            <div class="mt20">
              <p class="fontSty-2">{{ item.to.cstName }}</p>
              <span class="fontSty-3">收货地址：</span>{{ item.to.address
              }}<br />
              <span class="fontSty-3">联系方式：</span>{{ item.to.customer }}
              {{ item.to.tel }}<br />
              <span class="fontSty-3">收货时间：</span>{{ item.to.time }}
            </div>
          </el-col>
          <el-col :span="3">
            <div class="mt20 fontSty-1">{{ item.num }}件</div>
          </el-col>
          <el-col :span="3">
            <div class="mt20 fontSty-1">{{ item.weight }}</div>
          </el-col>
          <el-col :span="3">
            <div class="mt20 fontSty-1">{{ item.volumn }}</div>
          </el-col>
        </el-row>
      </div>
    </template>
  </section>
</template>

<script>
export default {
  name: "DispatchOrder",
  props: {
    recordsList: {
      type: Array,
      default: () => []
    }
  },
  data () {
    return {};
  },
  methods: {}
};
</script>

<style lang="scss" scoped>
.tableHead {
  padding: 15px 0;
  background: #fafafa;
}
p {
  margin: 0;
}
.mt20 {
  margin-top: 20px;
}
.line-herger28 {
  line-height: 28px;
}
.fontSty {
  font-size: 12px;
  font-weight: 500;
  color: var(--prev-color-text-ashes);
}
.fontSty-1 {
  font-size: 14px;
  color: var(--prev-color-text-ashes);
}
.fontSty-2 {
  font-size: 16px;
  font-weight: bold;
  color: var(--prev-color-text-ashes);
}
.fontSty-3 {
  font-size: 14px;
  color: var(--prev-border-color-lightgrey);
  font-weight: 500;
}
.fontSty-4 {
  font-size: 14px;
  color: var(--prev-color-text-silvergrey);
  font-weight: 500;
}
</style>
